using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace NorthStar.Driver
{
    public class MyMessageBox
    {
        private Context m_context { get; set; }
        public MyMessageBox( Context contex )
        {
            m_context = contex;
        }
        public void SetAlertBox(string title, string msg, string buttonText, Intent intent)
        {
            AlertDialog ad = new AlertDialog.Builder(m_context).Create();
            ad.SetTitle(title);
            ad.SetMessage(msg);
            ad.SetButton2(buttonText, (s, e) => { m_context.StartActivity(intent); });
            ad.Show();
        }
        public void SetAlertBox(string title, string msg, string buttonText)
        {
            AlertDialog ad = new AlertDialog.Builder(m_context).Create();
            ad.SetTitle(title);
            ad.SetMessage(msg);
            //ad.SetButton("Yes!", (s, e) => { StartActivity(typeof(MainActivity)); });
            ad.SetButton2(buttonText, (s, e) => { });
            ad.Show();
        }
        public void SetAlertBox(string title, string msg, string buttonText1, string buttonText2, Intent intent)
        {
            AlertDialog ad = new AlertDialog.Builder(m_context).Create();
            ad.SetTitle(title);
            ad.SetMessage(msg);
            ad.SetButton(buttonText1, (s, e) =>
            {
                
                m_context.StartActivity(intent);
            });
            ad.SetButton2(buttonText2, (s, e) => { });
            ad.Show();
        }
    }
}